package com.redis.demo.web;

import com.redis.demo.lang.Result;
import com.redis.demo.service.TagService;
import com.redis.demo.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 标签控制器
 * @date 2020/10/22 15:18
 */
@RestController
@RequestMapping("tag")
public class TagController {

    @Autowired
    private TagService tagService;

    /**
     * 查询全部标签
     * @return result
     */
    @RequestMapping("list")
    public Result list(){
        return ResultUtil.success(tagService.queryAllTagName());
    }

}
